//============================================================================
// Copyright (C) 2003-2013 Brett R. Jones 
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses 
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================

typedef struct 
{
	U16		u16PetColor;// color of pet
	U32		u32PetSn;	// serial of pet
	U32		u32ModelId;	// model of pet
}PetListStruct;

// show or buy items from vendor
class PktPetList : public VxPktHdr
{
public:
	PktPetList()
	{
		m_u16PktType = PKT_TYPE_PET_LIST;
	}
	void CalcLen( U16 u16PetCnt )
	{
		//calculate length of packet from number of items bought
		m_u16PktLen = ROUND_TO_16BYTE_BOUNDRY( ( sizeof( PktPetList ) - (PKT_MAX_PETS_PER_PLAYER * sizeof( PetListStruct )) +  (u16PetCnt * sizeof( PetListStruct ))) );
	}
	U16 u1PetCnt; // number pets listed
	PetListStruct agPets[ PKT_MAX_PETS_PER_PLAYER  ];
};